<?php 
   $time=  date_default_timezone_set('UTC');
   if ($time){
       $DATENOW= date("Y-m-d");
} else {
    $DATENOW= date("Y-m-d");
}
 
   $position_content='content';
   
   $select_image="SELECT *FROM tbl_advertisement WHERE adv_status=1 AND adv_position='".$position_content."'";
   $Query=mysql_query($select_image);
   $numrows=mysql_num_rows($Query);
   if($numrows>0){
	     while($rows=mysql_fetch_array($Query,MYSQL_ASSOC)){
			 $images=$rows['adv_upload_image'];
			 $dateend=$rows['adv_dateendpost'];
			 $addlinkimage=$rows['adv_addlink'];
			 if($DATENOW <=$dateend ){
				 
?>
        <div class="advertise">
			<div class="ad-in">
                <a href="<?php echo $addlinkimage ?>" target="_blank">
                  <img class="bo_ddd radius3 sad_ddd" src="<?php echo W_ROOT;?>/admin/advertise/upload_image/banner/<?php echo $images?>"/>
                <span class="cta-circle"></span>
                </a>
			</div>			
        </div>


<?php 
    }
	   
 }
}
?>